package com.itheima.operator;

public class OperatorDemo6 {
    public static void main(String[] args) {
        // 目标：学习关系运算符 ： == != > >= < <=
        double money = 10000;

        boolean flag = money == 10000;
        System.out.println(flag);

        System.out.println(money == 10000);
        System.out.println(money > 10000);   // false
        System.out.println(money >= 10000);  // true
        System.out.println(money < 10000);   // false
        System.out.println(money <= 10000);  // true
        System.out.println(money != 10000);  // false


        System.out.println(10 == 5);// false
        System.out.println(10 > 5); //true
        System.out.println(10 < 5);  //false
        System.out.println(10 >= 5);//true
        System.out.println(10 <= 5); //false
        System.out.println(10 != 5);//true

        // 注意点：相等判断必须使用==
        int a = 10;
        int b = 100;
        System.out.println(a == b); //false
        System.out.println(a = b);  // 100

    }
}
